<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改单选题')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-sysSingleQuestion-edit" th:object="${sysSingleQuestion}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">适用课程名称：</label>
                    <div class="col-sm-8">
                        <input name="courseName" th:field="*{courseName}" class="form-control" type="text" required readonly>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">题目描述：</label>
                    <div class="col-sm-8">
                        <textarea name="titleDescription" class="form-control" required>[[*{titleDescription}]]</textarea>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">选项A：</label>
                    <div class="col-sm-8">
                        <input name="optionA" th:field="*{optionA}" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">选项B：</label>
                    <div class="col-sm-8">
                        <input name="optionB" th:field="*{optionB}" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">选项C：</label>
                    <div class="col-sm-8">
                        <input name="optionC" th:field="*{optionC}" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">选项D：</label>
                    <div class="col-sm-8">
                        <input name="optionD" th:field="*{optionD}" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">正确答案：</label>
                    <div class="col-sm-8">
                        <select name="answer" class="form-control select2-multiple">
                            <option value="A">A</option>
                            <option value="B">B</option>
                            <option value="C">C</option>
                            <option value="D">D</option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">分数：</label>
                    <div class="col-sm-8">
                        <input name="grade" th:field="*{grade}" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "system/sysSingleQuestion";
        $("#form-sysSingleQuestion-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-sysSingleQuestion-edit').serialize());
            }
        }
    </script>
</body>
</html>